<?php $timeId = time().rand(0,1000);?>
<li>
    <div class="prd simg"><img src="<?php echo MY_URL?>/<?php echo $this->item['cut_url'];?>"></div>
    <div class="prd spname"><a href="<?php echo $this->url($this->item['itemid']);?>"><?php echo $this->item['subject'];?></a></div>
    <div class="prd sprice"><a class="sprice spbg f-blk"><?php if($this->item['is_suit']==1):?><strong>Team-buying Discount</strong><?php else:?>Price <span class="delete">$<?php echo $this->item['m_org_price'];?></span> <strong>$<?php echo $this->item['max_price'];?></strong><?php endif;?></a></div>
    <div><a class="f-blk pboxbar spbg" href="<?php echo $this->url($this->item['itemid']);?>" title="<?php echo $this->item['subject'];?>">&nbsp;</a></div>
	<div class="prd sprice"><span class="f1" ><span id="h<?php echo $timeId;?>" style="font-weight: bold">0</span> <span>h </span><span id="m<?php echo $timeId;?>" 
style="font-weight: bold">0</span> <span>m </span><span id="s<?php echo $timeId;?>" style="font-weight: bold"> 
0</span> <span>s</span></span></div> 
</li>
<script language="JavaScript"> 
var tms<?php echo $timeId;?> = <?php echo $this->endTime;?>;
function takeCount<?php echo $timeId;?>() { 
	tms<?php echo $timeId;?> -= 1; 
	var rest = tms<?php echo $timeId;?>-<?php echo time();?>;
	if(rest >= 0){
		var days = parseInt(rest / 86400);
	    rest = rest - days * 86400;
	    var hours = parseInt(rest / 3600);
	    rest = rest - hours * 3600;
	    var minutes = parseInt(rest / 60);
	    var seconds = rest - minutes * 60;

		if (days < 0) 
		days = 0; 
		if (hours < 0) 
		hours = 0; 
		if (minutes < 0) 
		minutes = 0; 
		if (seconds < 0) 
		seconds = 0; 
		$('#h<?php echo $timeId;?>').html(hours); 
		$('#m<?php echo $timeId;?>').html(minutes); 
		$('#s<?php echo $timeId;?>').html(seconds); 
		setTimeout("takeCount<?php echo $timeId;?>()", 1000); 
	}else{
		$('#h<?php echo $timeId;?>').parent().parent().parent().hide();
	}
} 
setTimeout("takeCount<?php echo $timeId;?>()", 1000); 
</script> 